#ifndef DICTATIONFILE_H
#define DICTATIONFILE_H

#include <QObject>
#include <QMap>
#include <QXmlStreamReader>

class DictationFile : public QObject
{
    Q_OBJECT
public:
    DictationFile();
    DictationFile(const QString &filepath);

    void loadXmlFilePath(const QString &filepath);
    void saveXmlFilePath(const QString &filepath);
    void reset();

    QString title();
    QString transcript();
    QString answer();
    QString mmsUrl();
    QString localAsfPath();
    QString filePath();

    bool isUnSaved();

    void setTitle(const QString &title);
    void setTranscript(const QString &transcript);
    void setAnswer(const QString &answer);
    void setMmsURL(const QString &url);
    void setLocalAsfPath(const QString &path);

private:
    void addElementDataToMap(QXmlStreamReader &reader, QMap<QString, QString>& map);

    bool m_unsaved;
    QString m_filepath;

    QString m_title;
    QString m_transcript;
    QString m_answer;
    QString m_mmsUrl;
    QString m_localAsfPath;
};

#endif // DICTATIONFILE_H
